﻿<%template _header%>
<%namespace YouHP.Model%>
<%namespace YouHP.BLL%>
<!--header end-->

<!--TheCurrent end-->
<style>
.message td
{
  border-bottom:1px solid #D8DFEA;
  padding-top:5px;
  padding-bottom:5px;
}
.message span
{
	color:#999999;
}
.message a
{
	color:Green!important;
}
.message p
{
	margin-bottom:5px;
}
</style>
<script type="text/javascript">
function init()
{
   _$('reply').focus();
}
window.onload = init;
</script>

<!--主体-->
<div class="layout-cols2">
<%template _memmenu%>

<div class="pannelcontent">

<div class="pcontent">
	   <div class="panneldetail">
		<%template _mempmenu%>
			<div class="pannelbody">
			

                	<div class="message">
                  <%if UserData.Id!=MsgData.msgfromid %>
                  <%csharp%>TempUrl = "/Profile/Index.aspx?uid=" + MsgData.msgfromid;<%/csharp%>
                  <div style=" border-bottom:1px solid #D8DFEA;">我和&nbsp;<a href="{this.GetUrl(TempUrl)}">{MsgData.msgfrom}</a>&nbsp;之间的私密谈话</div>
                  <%else%>
                    <%csharp%>TempUrl = "/Profile/Index.aspx?uid=" + MsgData.msgtoid;<%/csharp%>
                  <div style=" border-bottom:1px solid #D8DFEA;">我和&nbsp;<a href="{this.GetUrl(TempUrl)}">{MsgData.msgto}</a>&nbsp;之间的私密谈话</div>
                  <%/if%>
				  		<form id="pmform" name="pmform" method="post" action="">
						<table width="800px" border="0" cellspacing="0" cellpadding="0">
						
						<tbody>
							<tr>
							  <%csharp%>TempUrl = "/Profile/Index.aspx?uid=" + MsgData.msgfromid;<%/csharp%>
							<td style="text-align:center; vertical-align:middle;width:100px;">
							<a href="{this.GetUrl(TempUrl)}"><img src="{UserBLL.Instance.GetUserInfo(MsgData.msgfromid).Avatar}" width="45px" height="45px" /></a>				
							<br />
							<a href="{this.GetUrl(TempUrl)}">{MsgData.msgfrom}</a>
							<%csharp%>TempUrl = MsgData.PostDateTime.ToString("MM月dd日");<%/csharp%>  
						 	<div><span style="margin-left">&nbsp;{TempUrl}</span></div>
							</td>
 
							<td style="text-align:left; vertical-align:top;">{MsgData.message}</td>
							</tr>
							
						</tbody>
						
						
						
						<%csharp%>
						foreach(MessageInfo item in MsgReplyList)
						{
						<%/csharp%>
							<tbody>
							<tr>
							  <%csharp%>TempUrl = "/Profile/Index.aspx?uid=" + item.msgfromid;<%/csharp%>
							<td style="text-align:center; vertical-align:middle;width:100px;">
							
							<a href="{this.GetUrl(TempUrl)}"><img src="{UserBLL.Instance.GetUserInfo(item.msgfromid).Avatar}" width="45px" height="45px" /></a>				
							<br />
							<a href="{this.GetUrl(TempUrl)}">{item.msgfrom}</a>
							<%csharp%>TempUrl = item.PostDateTime.ToString("MM月dd日");<%/csharp%>  
						 	<div><span style="margin-left">&nbsp;{TempUrl}</span></div>
							</td>
                           
                         
						 	
							<td style="text-align:left; vertical-align:top;">{item.message}</td>
			
							</tr>
							
							</tbody>
						<%csharp%>
						}
						<%/csharp%>
						</table>
					
	                    </form>
					</div>
					
	                  <form id="replyform" name="replyform" method="post" action="">
                        <div class="bor"> 
                        <table>
                        <tr>
                        <td valign="top">
                        回复：
                        </td>
                        <td>
                        <textarea cols="80" rows="6" id="reply" name="reply"></textarea>
                        </td>
                        </tr>
                        <tr>
                        <td>&nbsp;</td>
                        <td align="right"> <input type="button" value="回复" onclick="postReply();"/></td>      
                        </tr>
                        </table>
                        </div>
                     </form>
                     
                     <script type="text/javascript">
                     function postReply()
                     {
                          var replycontent = _$('reply').value;
                          if(replycontent.length == 0)
                          {
                             alert("内容不能为空！");
                             return;
                           }
                           else
                           {
                              _$('replyform').submit();
                           }
                     
                     }
                     
                     
                     </script>
					
                    <div style="margin:10px">
                    <div class="pages">
                    {PagingString}
                    </div>
                    </div>

			</div>
		</div>
 </div>
 </div>
</div>

<!--主体-->
<%template _footer%>
